/**
 * 
 */
package com.planner.core.algorithm.dijkstra.model;

import com.planner.core.vo.GraphNode;

/**
 * @author Sangharsh
 *
 */
public class Edge  {
	private final String id; 
	private final GraphNode source;
	private final GraphNode destination;
	private final int weight; 
	
	public Edge(String id, GraphNode source, GraphNode destination, int weight) {
		this.id = id;
		this.source = source;
		this.destination = destination;
		this.weight = weight;
	}
	
	public String getId() {
		return id;
	}
	public GraphNode getDestination() {
		return destination;
	}

	public GraphNode getSource() {
		return source;
	}
	public int getWeight() {
		return weight;
	}
	
	@Override
	public String toString() {
		return source.getName() + " " + destination.getName();
	}
	
	
}

